<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let str = "王倪萍";
        let a = str.padStart(5,"美女");
        console.log(a);
        let b = str.padEnd(5,"美女");
        console.log(b);
        // 实际应用
        let num ="111111111122222333";
        let last = num.slice(-6);
        let c = last.padStart(18,"*")
        console.log(c);
        
    </script>
</body>
</html>